👀 Reading hidden code
using PenPlots , PlutoUI
1.0
1.09907
2.0
0.454177
3.0
1.16259
4.0
1.68631
5.0
1.61625
6.0
1.80039
7.0
1.32847
8.0
1.60333
9.0
1.23392
10.0
1.54239
11.0
1.31971
12.0
1.4772
13.0
1.06468
14.0
0.597628
15.0
0.735106
16.0
0.0722597
17.0
0.376917
18.0
-0.396221
19.0
0.0010866
20.0
-0.565739
91.0
0.128803
92.0
-0.164408
93.0
0.0908337
94.0
0.5369
95.0
1.07384
96.0
0.74318
97.0
1.39774
98.0
1.54758
99.0
1.45955
100.0
1.88631
👀 Reading hidden code
coords = [
Point(i, sin(i/5) + rand())
for i in 1:100
]
👀 Reading hidden code
👀 Reading hidden code
point_at_angle (generic function with 1 method)
👀 Reading hidden code
20
👀 Reading hidden code
nturns = 20
👀 Reading hidden code
👀 Reading hidden code
0.0
0.9
👀 Reading hidden code
UndefVarError: img not defined
Here is what happened, the most recent locations are first:
- get_value_at
(p::GeometryBasics.Point{2, Float64}) from Other cell: line 3function get_value_at(p::Point)
max_size = minimum(size(img)) / 2
q = max_size * p + Point(max_size, max_size)
- Show more...
Try asking on Julia Discourse!
[
# Path(spiral(false)),
Path(spiral(true)),
# Path((scale * spiral()) .+ Point(offset, 0)),
]
👀 Reading hidden code
spiral (generic function with 1 method)
spiral(special::Bool) = [
if special
p = a * point_at_angle(a)
val = get_value_at(p / nturns)
a * point_at_angle(a) + (1.0 - val) * 0.4 * point_at_angle(a^2 * 7)
else
a * point_at_angle(a)
end
for a in range(0, nturns, 5000 * nturns)
]
👀 Reading hidden code
👀 Reading hidden code
👀 Reading hidden code
using Images
👀 Reading hidden code
img = load(download("https://fonsp.com/img/doggoSmall.jpg?raw=true"))
👀 Reading hidden code
ArgumentError: No file exists at given path: /Users/fons/Pictures/axi/berg2.jpeg
Here is what happened, the most recent locations are first:
- checkpath_loadfrom loadsave.jl:167
- load
(::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) from loadsave.jl:110 - loadfrom loadsave.jl:110
- from This cell: line 1
img = load("/Users/fons/Pictures/axi/berg2.jpeg")
img = load("/Users/fons/Pictures/axi/berg2.jpeg")
👀 Reading hidden code
get_value_at (generic function with 1 method)
function get_value_at(p::Point)
max_size = minimum(size(img)) / 2
q = max_size * p + Point(max_size, max_size)
r(x) = round(Int, x)
color = get(
img,
(
r(q[2]),
r(q[1]),
),
zero(eltype(img)),
)
gray(Gray(color))
end
👀 Reading hidden code
UndefVarError: img not defined
Here is what happened, the most recent locations are first:
- get_value_at
(p::GeometryBasics.Point{2, Int64}) from Other cell: line 3function get_value_at(p::Point)
max_size = minimum(size(img)) / 2
q = max_size * p + Point(max_size, max_size)
- Show more...
Silly computer!
get_value_at(Point(1,0))
👀 Reading hidden code
UndefVarError: img not defined
Here is what happened, the most recent locations are first:
- get_value_at
(p::GeometryBasics.Point{2, Float64}) from Other cell: line 3function get_value_at(p::Point)
max_size = minimum(size(img)) / 2
q = max_size * p + Point(max_size, max_size)
- Show more...
get_value_at(Point(-.99999,-.3))
👀 Reading hidden code